package org.activiti.solon.controller;

import lombok.extern.slf4j.Slf4j;
import org.activiti.solon.entity.ActExtBind;
import org.activiti.solon.service.ActExtBindService;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Inject;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.annotation.Post;

import java.math.BigInteger;

/**
 * 扩展绑定表
 */
@Slf4j
@Mapping("/flow")
@Controller
public class ActExtBindController {
    @Inject
    private ActExtBindService actExtBindService;

    /**
     * 绑定一个流程图
     */
    @Post
    @Mapping("/model/bind/save")
    public BigInteger saveBindInfo(ActExtBind bindInfo) {
        // 业务已绑定更新，未绑定插入
        return actExtBindService.saveBindInfo(bindInfo);
    }
}
